//
//  Computer.m
//  LearnObjectiveC
//
//  Created by client on 2017/9/11.
//  Copyright © 2017年 吴可高. All rights reserved.
//

#import "Computer.h"
#import "CPU.h"
#import "Memory.h"
#import "Disk.h"

@interface Computer()
@property(nonatomic,strong) CPU * cpu;
@property(nonatomic,strong) Memory * memory;
@property(nonatomic,strong) Disk * disk;

@end

@implementation Computer
- (instancetype)init
{
    self = [super init];
    if (self) {
        _cpu = [[CPU alloc]init];
        _memory = [[Memory alloc]init];
        _disk = [[Disk alloc]init];
    }
    return self;
}

-(void)startUp;
{
    NSLog(@"start the computer");
    [self.cpu startUp];
    [self.memory startUp];
    [self.disk startUp];
}

-(void)shutdown;
{
    NSLog(@"shutdown the computer");
    [self.cpu shutdown];
    [self.memory shutdown];
    [self.disk shutdown];
}

@end
